package kr.co.waitnumber.site.management.service;

import kr.co.waitnumber.site.domain.Member;
import kr.co.waitnumber.site.management.dao.MemberDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;


public class WaitNumberServiceImpl implements WaitNumberService {


    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(WaitNumberServiceImpl.class);

    @Autowired
    private MemberDao memberDao = null;





    //Member Service
    public List getMemberListBySearchword(Member member){
        return memberDao.getMemberListBySearchword(member);
    }

    public String getTotalMemberCountBySearchword(Member member){
        return memberDao.getTotalMemberCountBySearchword(member);
    }

    public String getName(String name) {
        String rtnName = "";
        return (new StringBuilder()).append(name).append(rtnName).toString();
    }

    public Member getMemberById(String id) {
        return memberDao.getMemberById(id);
    }

    public Member getMemberByEmail(String id){
        return memberDao.getMemberByEmail(id);
    }

    public Member getMemberByIdEmail(Member member){
        return memberDao.getMemberByIdEmail(member);
    }

    public String getMemberExistById(String id) {
        return memberDao.getMemberExistById(id);
    }

    public String getMemberExistByEmail(String email){
        return memberDao.getMemberExistByEmail(email);
    }

    public String getMemberExistByIdEmail(Member member){
        return memberDao.getMemberExistByIdEmail(member);
    }

    public String insertMember(Member member){
        return memberDao.insertMember(member);
    }

    public String updateMemberById(Member member){
        return memberDao.updateMemberById(member);
    }

    public String adminUpdateMemberById(Member member){
        return memberDao.adminUpdateMemberById(member);
    }


    public String updateMemberPasswordById(Member member){
        return memberDao.updateMemberPasswordById(member);
    }

    public String deleteMemberById(String id){
        return memberDao.deleteMemberById(id);
    }




}
